<?php
include 'common.php';
include 'header.php';
include 'menu.php';

$stat = Typecho_Widget::widget('Widget_Stat');
?>

<?php Typecho_Widget::widget('Widget_Contents_Order_Admin')->to($order); ?>
<div class="main">
    <div class="body body-950">
        <?php include 'page-title.php'; ?>
        <div class="container typecho-page-main">
            <div class="column-24 start-01">
                
                <div class="typecho-list-operate">
                <form method="get">
                    <p class="operate"><?php _e('操作'); ?>: 
                        <span class="operate-button typecho-table-select-all"><?php _e('全选'); ?></span>, 
                        <span class="operate-button typecho-table-select-none"><?php _e('不选'); ?></span>&nbsp;&nbsp;&nbsp;
                        <?php _e('选中项'); ?>: 
                        <span rel="delete" lang="<?php _e('你确认要删除这些订单吗?'); ?>" class="operate-button operate-delete typecho-table-select-submit"><?php _e('删除'); ?></span>
                    </p>
                </form>
                </div>
            
                <form method="post" name="manage_medias" class="operate-form" action="<?php $options->index('/action/contents-order-edit'); ?>">
                <table class="typecho-list-table draggable">
                    <colgroup>
                        <col width="25"/>
                        <col width="120"/>
                        <col width="355"/>
                        <col width="220"/>
                        <col width="150"/>
                    </colgroup>
                    <thead>
                        <tr>
                            <th class="typecho-radius-topleft"> </th>
                            <th><?php _e('用户'); ?></th>
                            <th><?php _e('联系方式：【电话】【邮箱】【地址】'); ?></th>
                            <th><?php _e('订购产品'); ?></th>
                            <th class="typecho-radius-topright"><?php _e('发布日期'); ?></th>
                        </tr>
                    </thead>
                    <tbody>
                    	<?php if($order->have()): ?>
                        <?php while($order->next()): ?>
						<?php 
							$content = unserialize( $order->text );
						?>
                        <tr<?php $order->alt(' class="even"', ''); ?> id="<?php $order->theId(); ?>">
                            <td><input type="checkbox" value="<?php $order->cid(); ?>" name="cid[]"/></td>
                            <td><a href="#"><?php echo $content['name']; ?></a></td>
                            <td>
								<a href="#"><?php echo  $content['tel']; ?></a><br/>
								<a href="#"><?php echo  $content['mail']; ?></a><br/>
								<a href="#"><?php echo  $content['add']; ?></a><br/>
							</td>
                            <td>
                            <?php if ($order->parentPost->cid): ?>
                            <?php $order->parentPost->title(); ?>
                            <?php else: ?>
                            <span class="description"><?php _e('未归档'); ?></span>
                            <?php endif; ?>
                            </td>
                            <td><?php $order->dateWord(); ?></td>
                        </tr>
                        <?php endwhile; ?>
                        <?php else: ?>
                        <tr class="even">
                        	<td colspan="8"><h6 class="typecho-list-table-title"><?php _e('没有任何订单'); ?></h6></td>
                        </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
                <input type="hidden" name="do" value="delete" />
                </form>
                
                <?php if($order->have()): ?>
            <div class="typecho-pager">
                <div class="typecho-pager-content">
                    <ul>
                        <?php $order->pageNav(); ?>
                    </ul>
                </div>
            </div>
            <?php endif; ?>
                
            </div>
        </div>
    </div>
</div>

<?php
include 'copyright.php';
include 'common-js.php';
include 'footer.php';
?>
